package org.game.log;

import org.game.log.builder.LogDsp;
import org.game.log.dsp.RoleDsp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sojoys.artifact.tools.SK_Plus;

/**
 * @author : DengYing
 * @CreateDate : 2017年12月18日 上午10:24:30
 * @Description ：精灵日志
 */
public class LogRole implements IGameLogger {
	
	private LogRole() {
	}

	private static LogRole ME = new LogRole();

	public static LogRole me() {
		return ME;
	}

	private static Logger goodsLogger = LoggerFactory.getLogger("role");
	
	public void log(int pid,int cid,int changeNum, int nowCount,LogDsp logDsp) {
		SK_Plus sb = getPlayerInfo(pid);
    	addField(sb, cid);
    	addField(sb, changeNum);
    	addField(sb, nowCount);
    	addField(sb, logDsp.getDsp());
    	addField(sb, logDsp.build());
		goodsLogger.info(sb.e());
	}
}
